package cn.flyme.shop.service.impl;

import cn.flyme.shop.mapper.CartMapper;
import cn.flyme.shop.service.CartService;
import cn.flyme.shop.vo.CartVo;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CartServiceImpl implements CartService {

    @Autowired
    CartMapper cartmapper;

    @Override
    public PageInfo getCart(Long uid) {
        List<CartVo> cartVos = cartmapper.selectByUserId(uid);
        PageInfo pageInfo = new PageInfo(cartVos);
        return pageInfo;
    }
}
